package com.jiayinlending.jiayindai.activity.home;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.SeekBar;
import android.widget.TextView;

import com.jiayinlending.jiayindai.R;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/*
* 产品详情页
* */
public class HomeDetailsActivity extends AppCompatActivity {

    @Bind(R.id.toolbar_title)
    TextView toolbarTitle;
    @Bind(R.id.toolbar)
    Toolbar toolbar;
    @Bind(R.id.sb_home_jindu)
    SeekBar sbHomeJindu;
    @Bind(R.id.tv_calc)
    TextView tvCalc;
    @Bind(R.id.tv_record)
    TextView tvRecord;
    @Bind(R.id.tv_boodlist)
    TextView tvBoodlist;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_details);
        ButterKnife.bind(this);
        sbHomeJindu.setProgress(50);
        inittitle();
    }

    private void inittitle() {
        toolbarTitle.setText("嘉银贷588期");
    }


    @OnClick({R.id.tv_record, R.id.tv_calc})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_record:
                startActivity(new Intent(HomeDetailsActivity.this, RecordActivity.class));
                break;
            case R.id.tv_calc:
                startActivity(new Intent(HomeDetailsActivity.this, IncomeActivity.class));
                break;
        }
    }

    @OnClick(R.id.tv_boodlist)
    public void onViewClicked() {
        startActivity(new Intent(HomeDetailsActivity.this, BondlistActivity.class));
    }
}
